Skip to content

Improve file patterns for some backends. #147633

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pcc
Copy link
Contributor

@pcc pcc commented Jul 9, 2025

I noticed that one of my PRs, #147624, did not get automatically
labelled with backend:RISC-V when it touched a test under
llvm/test/CodeGen/RISCV. This seems to be because the pattern only
looks for files named *RISCV* or `riscv and not necessarily files
in a directory named like that. To fix that, let's make RISC-V use
a more accepting pattern, similar to AMDGPU, and do the same for two
other backends.

Created using spr 1.3.6-beta.1
@pcc pcc requested a review from arsenm July 9, 2025 01:10
@arsenm arsenm requested a review from tstellar July 9, 2025 01:11
@llvmbot
Copy link
Member

llvmbot commented Jul 9, 2025

@llvm/pr-subscribers-github-workflow

Author: Peter Collingbourne (pcc)

Changes

I noticed that one of my PRs, #147624, did not get automatically
labelled with backend:RISC-V when it touched a test under
llvm/test/CodeGen/RISCV. This seems to be because the pattern only
looks for files named *RISCV* or `riscv and not necessarily files
in a directory named like that. To fix that, let's make RISC-V use
a more accepting pattern, similar to AMDGPU, and do the same for two
other backends.


Full diff: https://github.com/llvm/llvm-project/pull/147633.diff

1 Files Affected:

  • (modified) .github/new-prs-labeler.yml (+10-8)
diff --git a/.github/new-prs-labeler.yml b/.github/new-prs-labeler.yml
index 863090af9af7e..b05e9c6c56ed0 100644
--- a/.github/new-prs-labeler.yml
+++ b/.github/new-prs-labeler.yml
@@ -784,18 +784,20 @@ backend:NVPTX:
 backend:MIPS:
   - '**/*mips*'
   - '**/*Mips*'
+  - '**/*mips*/**'
+  - '**/*Mips*/**'
 
 backend:RISC-V:
-  - clang/**/*riscv*
-  - clang/**/*RISCV*
-  - llvm/**/*riscv*
-  - llvm/**/*RISCV*
+  - '**/*riscv*'
+  - '**/*RISCV*'
+  - '**/*riscv*/**'
+  - '**/*RISCV*/**'
 
 backend:Xtensa:
-  - clang/**/*xtensa*
-  - clang/**/*Xtensa*
-  - llvm/**/*xtensa*
-  - llvm/**/*Xtensa*
+  - '**/*xtensa*'
+  - '**/*Xtensa*'
+  - '**/*xtensa*/**'
+  - '**/*Xtensa*/**'
 
 lld:coff:
   - lld/**/COFF/**

Comment on lines +787 to +788
- '**/*mips*/**'
- '**/*Mips*/**'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does ** only work after a /?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, I was just cargo culting AMDGPU. https://github.com/actions/labeler doesn't say that anything besides ** works.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the underlying implementation is https://github.com/isaacs/minimatch#minimatch, so whatever works there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There don't seem to be any tests in that repository that test whether ** not on its own also matches /, so I assume it doesn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants